﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AssignTransporterToEmployee.aspx.cs" Inherits="ForestryEnterprise.AssignTransporterToEmployee" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <table class="style1">
            <tr>
                <td width="50%">
                    <asp:Label ID="Label1" runat="server" Text="Employee:"></asp:Label>
                    <asp:DropDownList ID="empList" runat="server" 
                        onselectedindexchanged="empList_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td>
                    Equipment:<asp:DropDownList ID="equList" runat="server" 
                        onselectedindexchanged="equList_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
        <br />
        <asp:GridView ID="EmpGridView" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ssn" DataSourceID="EmpData" EnableModelValidation="True" 
            onselectedindexchanged="EmpGridView_SelectedIndexChanged">
            <Columns>
                <asp:CommandField HeaderText="Select" ShowSelectButton="True" />
                <asp:BoundField DataField="ssn" HeaderText="ssn" ReadOnly="True" 
                    SortExpression="ssn" />
                <asp:BoundField DataField="p_fname" HeaderText="p_fname" 
                    SortExpression="p_fname" />
                <asp:BoundField DataField="p_lname" HeaderText="p_lname" 
                    SortExpression="p_lname" />
                <asp:BoundField DataField="p_birthDate" HeaderText="p_birthDate" 
                    SortExpression="p_birthDate" />
                <asp:BoundField DataField="a_zip" HeaderText="a_zip" SortExpression="a_zip" />
                <asp:BoundField DataField="a_city" HeaderText="a_city" 
                    SortExpression="a_city" />
                <asp:BoundField DataField="a_state" HeaderText="a_state" 
                    SortExpression="a_state" />
                <asp:BoundField DataField="a_strname" HeaderText="a_strname" 
                    SortExpression="a_strname" />
                <asp:BoundField DataField="a_strnumb" HeaderText="a_strnumb" 
                    SortExpression="a_strnumb" />
            </Columns>
        </asp:GridView>
        <asp:AccessDataSource ID="EmpData" runat="server" 
            DataFile="~/App_Data/ForestryEnterprise.mdb" 
            SelectCommand="SELECT * FROM [Person]"></asp:AccessDataSource>
        <br />
        <asp:GridView ID="EquGridView" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="eq_id" DataSourceID="EquData" EnableModelValidation="True" 
            onselectedindexchanged="EquGridView_SelectedIndexChanged">
            <Columns>
                <asp:CommandField HeaderText="Select" ShowSelectButton="True" />
                <asp:BoundField DataField="eq_id" HeaderText="eq_id" InsertVisible="False" 
                    ReadOnly="True" SortExpression="eq_id" />
                <asp:BoundField DataField="eq_name" HeaderText="eq_name" 
                    SortExpression="eq_name" />
                <asp:BoundField DataField="eq_status" HeaderText="eq_status" 
                    SortExpression="eq_status" />
                <asp:BoundField DataField="eq_used" HeaderText="eq_used" 
                    SortExpression="eq_used" />
                <asp:BoundField DataField="eq_type" HeaderText="eq_type" 
                    SortExpression="eq_type" />
                <asp:BoundField DataField="eq_date" HeaderText="eq_date" 
                    SortExpression="eq_date" />
            </Columns>
        </asp:GridView>
        <asp:AccessDataSource ID="EquData" runat="server" 
            DataFile="~/App_Data/ForestryEnterprise.mdb" 
            SelectCommand="SELECT * FROM [Equipment]"></asp:AccessDataSource>
        <br />
        <asp:TextBox ID="Empssn" runat="server"></asp:TextBox>
        <asp:TextBox ID="empFname" runat="server" Width="128px"></asp:TextBox>
        <asp:TextBox ID="EmpLname" runat="server"></asp:TextBox>
        <br />
        <asp:TextBox ID="EquID" runat="server"></asp:TextBox>
        <asp:TextBox ID="Eq_name" runat="server"></asp:TextBox>
        <br />
        <asp:Button ID="Assign" runat="server" onclick="Assign_Click" Text="Assign" />
        <br />
    
    </div>
    </form>
</body>
</html>
